<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.IOCompressionBrotli_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
    <Compile Include="$(CommonPath)Interop\Interop.Brotli.cs" />
    <!-- The native compression lib uses a BROTLI_BOOL type analogous to the Windows BOOL type -->
    <Compile Include="$(CommonPath)Interop\Windows\Interop.BOOL.cs" />
    <Compile Include="System\IO\Compression\enc\BrotliStream.Compress.cs" />
    <Compile Include="System\IO\Compression\dec\BrotliStream.Decompress.cs" />
    <Compile Include="System\IO\Compression\BrotliUtils.cs" />
    <Compile Include="System\IO\Compression\dec\BrotliDecoder.cs" />
    <Compile Include="System\IO\Compression\enc\BrotliEncoder.cs" />
    <Compile Include="System\IO\Compression\enc\BrotliEncoderOperation.cs" />
    <Compile Include="System\IO\Compression\enc\BrotliEncoderParameter.cs" />
    <Compile Include="System\IO\Compression\BrotliStream.cs" />
    <Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeBrotliHandle.cs"
             Link="Common\Microsoft\Win32\SafeHandles\SafeBrotliHandle.cs" />
  </ItemGroup>

  <!-- Windows specific files -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
  </ItemGroup>

  <!-- Unix specific files -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' ">
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
             Link="Common\Interop\Unix\Interop.Libraries.cs" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="System.Collections" />
    <Reference Include="System.IO.Compression" />
    <Reference Include="System.Memory" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.InteropServices" />
    <Reference Include="System.Threading" />
  </ItemGroup>

</Project>
